package youth;

class Human {
    protected String name;
    protected int age;
    protected String gender;

    public Human(String name,int age,String gender) {
        this.name=name;
        this.age=age;
        this.gender=gender;
    }
    public void introduce() {
        System.out.println("我是"+name+"，我"+age+"岁了，我的性别是"+gender);
    }
}

class OrdinaryYouth extends Human {
    private String school;
    private String job;

    public OrdinaryYouth(String name,int age,String gender,String school,String job) {
        super(name,age,gender);
        this.school=school;
        this.job=job;
    }

    @Override
    public void introduce() {
        super.introduce();
        System.out.println("我在"+school+"上学，我的工作是"+job);
    }
}

class ArtisticYouth extends Human {
    private String school;
    private String masterpiece;
    private String dream;

    public ArtisticYouth(String name,int age,String gender,String school,String masterpiece,String dream) {
        super(name,age,gender);
        this.school=school;
        this.masterpiece=masterpiece;
        this.dream=dream;
    }

    @Override
    public void introduce() {
        super.introduce();
        System.out.println("我在"+school+"上学，我的代表作是"+masterpiece+"，我的梦想是成为"+dream);
    }
}
public class youth {
    public static void main(String[] args) {
        Human human=new Human("小怡",20,"Female");
        System.out.println("Human:");
        human.introduce();
        System.out.println();

        OrdinaryYouth ordinaryYouth=new OrdinaryYouth("小马",19,"Female","北京大学","乒乓球职业运动员");
        System.out.println("Ordinary Youth:");
        ordinaryYouth.introduce();
        System.out.println();

        ArtisticYouth artisticYouth=new ArtisticYouth("小薇",19,"Female","清华大学","《我的好爸爸——小马》","职业电竞选手");
        System.out.println("Artistic Youth:");
        artisticYouth.introduce();
        System.out.println();
    }
}

